﻿@model Property4U.Models.Bid

@{
    ViewBag.Title = "Delete";
}

<div class="row">
    <!-- Page Header -->
    <div class="col-lg-12">
        <h1 class="page-header">@ViewBag.Title</h1>
    </div>
    <!--End Page Header -->
</div>

<h3>Are you sure you want to delete this?</h3>
<div>
    <h4>Bid</h4>
    <hr />
    <dl class="dl-horizontal">
        <dt>
            @Html.DisplayNameFor(model => model.Bidding)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.Bidding.Title)
        </dd>

        <dt>
            @Html.DisplayNameFor(model => model.MemberID)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.Member.Id)
        </dd>

        <dt>
            @Html.DisplayNameFor(model => model.Title)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.Title)
        </dd>

        <dt>
            @Html.DisplayNameFor(model => model.Description)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.Description)
        </dd>

        <dt>
            @Html.DisplayNameFor(model => model.Price)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.Price)
        </dd>

        <dt>
            @Html.DisplayNameFor(model => model.BidOn)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.BidOn)
        </dd>

        <dt>
            @Html.DisplayNameFor(model => model.BidStatus)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.BidStatus)
        </dd>

    </dl>

    @* Not Allow User to delete Bid after results are finalized. *@
            @{
                bool allowDel = true;
                if (Model.BidStatus.ToString().Equals("Winner"))
                {
                    allowDel = false;
                }
                else if (Model.BidStatus.ToString().Equals("Rejected"))
                {
                    allowDel = false;
                }
            }

    @if (allowDel)
    {
        using (Html.BeginForm()) {
            @Html.AntiForgeryToken()

        <div class="form-actions no-color">
            <input type="submit" value="Delete" class="btn btn-default" />@(" | ")
            @Html.ActionLink("Back to List", "Index")
        </div>
        }
    }
    else {
        @Html.ActionLink("Back to List", "Index")
    }

</div>
